#ifndef RTC_H
#define RTC_H

#define RTC_YEARS 	0x00
#define RTC_MONTHS 	0x01
#define RTC_DAYS 		0x02
#define RTC_HOURS 	0x03
#define RTC_MINUTES 	0x04

void rtc_time(u32int control, u32int value);
void init_rtc(void);
void init_rtc_interface(void);

typedef void (*callback_type_t)(u32int*);

typedef struct timed_callback
{
	callback_type_t callback;
	u32int* callback_ptr;
	u32int duration;
	u32int remainder;
	u32int repeat;
	struct timed_callback* next;
} timed_callback_t;

void rtc_reg_callback(callback_type_t callback, u32int* callback_ptr, u32int duration, u32int repeat);
void rtc_unreg_callback(callback_type_t callback);

#endif
